//
// Created by LONG on 2020/11/2.
//

#ifndef O5G_SRC_CCORE_MISC_INCLUDE_RBMACRO_H_
#define O5G_SRC_CCORE_MISC_INCLUDE_RBMACRO_H_

#include "../../include/commDef.h"
#include "../../../../lib/3rdParty/toml/toml.h"

#ifdef __cplusplus
extern "C"
{
#endif

#define VRB_PUT(RC, QUE, PTR, SIZE) \
do {\
    (RC) = (typeof(RC))VarRB_Put(QUE, PTR, SIZE);\
    if (O5G_RC_OK != (RC))\
    {\
        CSP_LOG_ERR(0, "[%s, %d] VarRB_Put failed!\n", (char *)__func__, __LINE__);\
    }\
} while (0)

#define FRB_PUT(RC, QUE, PTR, SIZE) \
do {\
    (RC) = (typeof(RC))FixRB_Put(QUE, PTR, SIZE);\
    if (O5G_RC_OK != (RC))\
    {\
        CSP_LOG_ERR(0, "[%s, %d] FixRB_Put failed!\n", (char *)__func__, __LINE__);\
    }\
} while (0)

#ifdef __cplusplus
}
#endif

#endif //O5G_SRC_CCORE_MISC_INCLUDE_RBMACRO_H_
